<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title> New Document </title>
  <meta charset="utf-8">
  <meta name="Generator" content="EditPlus">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <style>
	#condition{
		font-size:20px;
		color:#000;
	}
	p{
		font-size:30px;
		color:blue;
	}
  </style>
 <script src="/guofeng/data/js/jquery-1.7.2.min.js"></script>
  <script>
	$(function(){
		$("form").submit(function(){
			var data=$(this).serialize();
			$.ajax({
				url:"http://localhost/guofeng/login.php?a=admin&c=news&m=addnews",
				data:data,
				type:"post",
				datatype:"json",
				success:function(data){
					if(data['state']=1){
						alert("添加成功");
					}else{
						alert("添加失败");
					}
				}
			})
			return false;
		})
	})
  </script>
 </head>

 <body>
  <div>
            <div id="condition">当前位置：<a href="http://localhost/guofeng/login.php?a=admin&m=admin">后台管理</a>->新闻管理->添加新闻
			</div>
            <p>添加文章:</p>
            <form id="addProduct" action="http://localhost/guofeng/login.php?a=admin&c=product&m=addproduct" method="post">
                <table width="600" border="0" id="addProductTable"> 
                           <tr><td>文章名</td><td><input type="text" name="name"></td></tr>
                           <tr><td>摘要</td><td><textarea name="smallc" rows="3" cols="20"></textarea></tr>
							<tr><td>内容</td><td><textarea name="content" rows="10" cols="20"></textarea></td></tr>
                           <tr><td colspan="2"><input type="submit" value="添加文章"></td></tr>
                       </table>    
            </form> 
        </div>
 </body>
</html>
